/*
 * Copyright 2007-2009 Perttu "celeron55" Ahola <celeron55@gmail.com>
 *
 * This file is part of jukumagic.
 *
 * jukumagic is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * jukumagic is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with jukumagic.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef FLISTBOX_H_
#define FLISTBOX_H_

#include "common.h"
#include "footprint.h"
#include <wx/wx.h>
#include <vector>

class FListBox : public wxListBox
{
	int m_numbers_to_take;
	int m_numbers_token;
	int m_number;
public:
	void ResetNumberInput();
	FListBox();
	FListBox(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size);
	~FListBox();

	void OnRightUp(wxMouseEvent& event);
    void OnChar(wxKeyEvent &event);
    void OnKeyDown(wxKeyEvent &event);
    void OnKeyUp(wxKeyEvent &event);

    void SetFootprints(std::vector<Footprint*> &footprints);

private:
	DECLARE_DYNAMIC_CLASS(FListBox)
    DECLARE_EVENT_TABLE()
};

DECLARE_EVENT_TYPE(wxEVT_FLISTBOX_NUMBER_INPUT, -1)

#endif
